package com.flyqiu.flow.api.deploy;

import com.alibaba.fastjson2.JSONObject;
import com.flyqiu.flow.model.entity.ProcDeploySource;

public interface FlyQiuFlowDeployManage {

    /**
     * 注册流程发布插件
     *
     * @param deploy
     */
    void registerProcDeploy(IFlowDeploy deploy);

    /**
     * 获取流程发布插件
     *
     * @param key
     * @return
     */
    IFlowDeploy getDeploy(String key);

    /**
     * 获取默认执行类型key
     *
     * @return
     */
    String getDefProcExecuteTypeKey();

    /**
     * 设置默认执行
     *
     * @param key
     */
    void setDefProcExecuteTypeKey(String key);


    /**
     * 部署流程
     *
     * @param modelSource 流程资源
     * @param procDefKey  流程定义key
     * @param procName    流程名称
     * @param category    流程分组
     * @param category
     * @return
     */
    ProcDeploySource deploy(JSONObject modelSource, String deployType, String procDefKey, String procName, String category);


}
